/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package calculator;

/**
 *
 * @author Iskandar Sarkawi
 */
public class Calculator {

    private static int countCalculator=0;
    private int intNumber1;
    private int intNumber2;

    //set to protected if you want the subclass to be able to access 
    //protected int intNumber1;
    //protected int intNumber2;

    private int intTotalAdd;
    private int intTotalSubtract;

    public Calculator(int n1, int n2){
        intNumber1 = n1;
        intNumber2 = n2;
        countCalculator++;
    }

    public static int getCountCalculator(){
        return countCalculator;
    }

    public int getTotal(){
        intTotalAdd = intNumber1 + intNumber2;
        return intTotalAdd;
    }

    public int getSubtract(){
        intTotalSubtract = intNumber1 - intNumber2;
        return intTotalSubtract;
    }

    public void setNewNumber1(int n1){
        intNumber1 = n1;
    }

    public void setNewNumber2(int n2){
        intNumber2 = n2;
    }

    public int getNumber1(){
        return intNumber1;
    }

    public int getNumber2(){
        return intNumber2;
    }
}
